import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import {mapState, mapMutations} from 'vuex'
import api from './api/api'
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import VueWechatTitle from 'vue-wechat-title';
import moment from 'moment';

Vue.use(VueWechatTitle)
Vue.use(ElementUI);
Vue.mixin({
    computed: {
        ...mapState([
            'userInfo',
            'isAffair'
        ]),
    },
    methods: {
        ...mapMutations([
            'setUserInfo',
            'setisAffair'
        ]),
    }
});
Vue.config.productionTip = false
Vue.prototype.$api = api;
Vue.prototype.$moment = moment;
new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
